1. Field of the Invention
The present invention relates to a disk controlling apparatus and a disk controlling method thereby and, more particularly, to a disk controlling apparatus which is provided with a channel adapter serving as an interface between the disk controlling apparatus and a host apparatus, a device adapter serving as an interface between the disk controlling apparatus and an I/O device, and a resource manager for controlling the resource management as a whole and the processing operations, and a disk controlling method by the disk controlling apparatus.
2. Description of the Related Art
Information processing apparatuses have recently been required to enhance the processing efficiency. For example, in a magnetic disk controlling apparatus, if a plurality of interface processing such as a channel interface processing and a device interface processing are executed by one processor, the procedure inevitably becomes sequential, so that there is a limitation to the processing efficiency. In addition, in such a disk controlling apparatus provided with only one processor, when a change or addition of a function is necessary, the whole structure must be changed. To solve such a problem, in a recent disk controlling apparatus, various modules each having one function are combined by a common bus, and a desired function as a whole is executed by combining appropriate modules. Each module is provided with a processor, and executes the function allotted thereto in accordance with a microprogram corresponding to the function.
According to the disk controlling apparatus having such a structure, since it is possible to disperse processing to the respective modules, processing efficiency is enhanced. In addition, when a change or addition of a function is necessary, it is possible to construct a new disk controlling apparatus easily by adding a new module or changing the corresponding module.
FIG. 1 shows the structure of an I/O subsystem (magnetic disk subsystem). In FIG. 1, the reference numeral 1 represents a host apparatus (CPU), 2a, 2b channel devices, 3 a magnetic disk controlling apparatus as an I/O subsystem, and 4a to 4d magnetic disk apparatuses as I/O devices. In the I/O subsystem, the reference numerals 5a, 5b represent a plurality of host interface devices (channel adapters) each serving as an interface between the I/O subsystem and a host apparatus, 6a, 6b a plurality of subordinate interface devices (device adapters), 7 a general controller (resource manager) for controlling the resource management as a whole and the entire processing operations, 8 a table storage portion for storing various tables which are necessary for the management of the resources, and 9 an internal bus for connecting the channel adapters 5a, 5b, the device adapters 6a, 6b and the resource manager 7 so as to enable the transmission and the reception of data between each other.
Data are written on each track of the magnetic disk apparatus in accordance with a CKD format. FIG. 2 is an explanatory view of the CKD format. Each track has areas divided by gaps, and an index mark is attached to the head of the track. The symbol HA represents a home address area subsequent to the index mark, and the address of the track is written therein. A plurality of records R0, R1, R2 . . . each of which is composed of a count area C, a key area K and a data area D are written in the area subsequent to the home address region HA. In the counter area C, a track address CCHH (CC: Cylinder address, HH: head number), a record number R and the lengths of the subsequent key area and data area), etc. are written. Accordingly, by designating the track address and the record number, it is possible to designate each record. Although a key for retrieval is written in the key area K, this is not essential. User data are written in the data area D.
In the I/O subsystem having the above-described structure, data are written and read out in the following manner. In the following explanation, the I/O subsystem is assumed to be a magnetic disk controlling apparatus DCU. FIG. 3 is an explanatory view of a sequence for a data writing operation.
When a seek command SK is produced by the channel devices (CH) 2a and 2b, the magnetic disk controlling apparatus (DCU) 3 queues the command in a command queue without permitting the seeking operation of the magnetic disk apparatuses 4a to 4d. Thereafter, an operation end signal is supplied to the channel devices CH as if the seeking operation were finished. Since a positioning time and a rotation waiting time are necessary in a magnetic disk apparatus, a plurality of positioning commands such as a seek command and a set sector command are queued up and the commands in the queue are consecutively executed when a search ID command is received, thereby increasing the processing speed.
When the channel device CH receives the seek operation end signal, it issues a set sector command SS. The magnetic disk controlling apparatus DCU queues the set sector command, and an operation end signal is supplied to the channel devices CH as if the set sector operation were finished.
When the channel device CH receives the set sector operation end signal, it issues a search ID command SID. The magnetic disk controlling apparatus DCU so controls a magnetic disk apparatus DEV as to consecutively execute seek and set sector operations and issues a retry signal so as to separate the channel device CH from the magnetic disk controlling apparatus DCU during the operation. In this manner, the channel device CH is temporarily separated from the magnetic disk controlling apparatus DCU, so that the channel device CH can execute another service or the like to another magnetic disk controlling apparatus. When the channel device CH receives a command request signal from the magnetic disk controlling apparatus DCU after the channel device CH is separated in accordance with the retry signal, the channel device CH supplies again the latest command that it has issued.
When the seek and set sector operations are finished, the magnetic disk apparatus DEV supplies an operation end signal, and in accordance with the operation end signal, the magnetic disk controlling apparatus DCU supplies a command request signal to the channel device CH. When the channel device CH receives the command request signal, the channel device CH reissues the latest command, i.e., the search ID command SID, that it has issued. When the magnetic disk controlling apparatus DCU receives the search ID command SID, the magnetic disk controlling apparatus DCU so controls the magnetic disk apparatus DEV as to execute the search ID operation, and when the search ID operation is finished, the magnetic disk apparatus DEV supplies an operation end signal to the channel device CH. The channel device CH which has received the command request signal, it reissues the latest command, i.e., a write command WD, that it has issued. In accordance with the write command WD, the magnetic disk controlling apparatus DCU so controls the magnetic disk apparatus DEV as to execute the data write operation, and supplies a retry signal to the channel device CH so as to separate the channel device CH from the magnetic disk controlling apparatus DCU during the data writing operation.
When the data write operation is finished, the magnetic disk apparatus DEV supplies a data write operation end signal to the magnetic disk controlling apparatus DCU, and in accordance with the operation end signal, the magnetic disk controlling apparatus DCU supplies a command request signal to the channel device CH. When the channel device CH receives the command request signal, the channel device CH reissues the latest command, i.e., the write command WD, that it has issued. When the magnetic disk controlling apparatus DCU receives the write command WD, the magnetic disk controlling apparatus DCU immediately transfers the write operation end signal to the channel device CH, thereby completing a series of writing operations.
FIG. 4 is an explanatory view of another sequence for a data writing operation. This sequence is the same as that shown in FIG. 4 except that a retry signal is not transferred to the channel device CH at the time of data writing operation. FIG. 5 is an explanatory view of a sequence for a data reading operation. This sequence is the same as that shown in FIG. 3 except that the write command WD is replaced by a read command RD.
At the time of such data writing operation and data reading operation, the magnetic disk controlling apparatus (I/O subsystem) 3 internally executes the following transfer control (synchronous transfer control) in synchronism with a command.
1 When the channel adapter 5a receives commands (seek command, set sector command) from the channel device 2a, it informs the resource manager 7 of the reception of the commands, and the resource manager 7 queues the commands. 2 When the resource manager 7 receives the information of the reception of a search ID command from the channel adapter 5a, the resource manager 7 supplies a retry request to the channel device 2a through the channel adapter 5a and instructs the predetermined device adapter 6a to execute the seek and set sector operations. When the operations are finished, the resource manager 7 requests a command from the channel device 2a through the channel adapter 5a. 3 When the resource manager 7 receives the search ID command from the channel device 2a, it instructs the device adapter 6a to execute the search ID operation, and when the search ID operation is finished, it informs the channel device 2a of the end of the search ID operation through the channel adapter 5a. 4 When the search ID operation is finished, the resource manager 7 informs the channel adapter 5a of the device adapter 6a to and from which the data is transmitted and received, and informs the device adapter 6a of the channel adapter 5a to and from which the data is transmitted and received. 5 Thereafter, the channel adapter 5a supplies data directly to the designated device adapter 6a, which writes the data into a magnetic disk at the time of writing. At the time of reading, the device adapter 6a supplies the data read out of the magnetic disk directly into the channel adapter 5a, which transfers the data to the channel device 2a.
In such a synchronous transfer control system, a searching operation is executed in the following manner. FIG. 6 is an explanatory view of a search operation. In the case of a search ID operation, only the count area C in the record is searched so as to judge whether or not the record number agrees with the designated record number. If the answer is in the negative, the key area K and the data area D are skipped and the next count area C is read out. In this way, the searching operation is repeated until the record number agrees with the designated record number.
In the case of a search key operation, the count area C is read so as to discern the key position, and the key area K is then searched so as to judge whether or not the key portion agrees with the designated key portion. If the answer is in the negative, the data area D is skipped and the next count area C is read out. In this way, the searching operation is repeated until the key portion agrees with the designated key portion.
As described above, in the searching operation in synchronous transfer control, since the key area K and the data area D are skipped in the case of a search ID operation, it is possible to search for the required record without any error which is caused by a flaw produced in the key area or the data area. Similarly, in the case of a search key operation, since the data area D is skipped, it is possible to search for the required key without any error which is caused by a flaw produced in the data area.
In the synchronous transfer control system, a data reading operation is executed in the following manner. FIG. 7 is an explanatory view of a read CKD (READ COUNT KEY DATA) operation. When a CKD command is produced from the channel 2a, the channel adapter 5a instructs the device adapter 6a to read the count area C. If the reading operation is normally executed, the device adapter 6a transmits a signal NE (Normal End) to the channel adapter 5a. The channel adapter 5a which has received the signal NE instructs the device adapter 6a to read the key area K and when the channel adapter 5a receives a signal NE of the reading operation, it instructs the device adapter 6a to read the data area D. If there is a flaw in the data area D which obstructs normal data reading, the device adapter 6a detects an error and informs the channel adapter 5a of the error by creating sense data. The channel adapter 5athen transmits the error status and the sense data to the channel device 2a. In this way, in simultaneous transfer control, when a read error caused by a flaw in the area to be read is detected, the channel adapter 5a is immediately informed of the error status and the sense data.
The simultaneous transfer control system, however, suffers from a problem that since data is transferred synchronously by the channel adapter and the device adapter in the above-described manner, the data transfer speed is slow. To solve this problem, an asynchronous transfer control system is proposed. This control system adopts an intermediate buffer so as to transfer data asynchronously by the channel adapter and the device adapter, thereby increasing the transfer speed. FIG. 8 shows the structure of an I/O subsystem for realizing asynchronous transfer control. This I/O subsystem is the same as that shown in FIG. 1, except that an intermediate buffer 10 is provided. The same numerals are provided for the elements which are the same as those shown in FIG. 1.
In the asynchronous transfer control system, after the end of a set sector operation, the device adapters 6a, 6b read in advance the record (CKD format data) in the subsequent one or two tracks from the magnetic disks 4a to 4d and stores the record in the intermediate buffer 10. The channel adapters 5a, 5b search the intermediate buffer 10 for the required data on the basis of a search ID, search key or read command and transfers the required data to the host apparatuses 2a, 2b.
FIG. 9 is an explanatory view of the operation of writing record from the magnetic disk to the intermediate buffer 10. When the set sector operation is finished, the device adapters 6a, 6b immediately read the record (CKD format data) in a predetermined range from the positioned sector and write the records into the intermediate buffer 10 without inserting any gap (see FIG. 9A). If all the records in a predetermined range are written into the intermediate buffer 10 in this manner, it is possible to read the required record by searching the key area K without any trouble. It is because the device adapters 6a, 6b cannot decide which of the count area C, the key area K and the data area D is required by a processing command (search command, read command) that all the CKD format data are written into the intermediate buffer 10.
There is no problem when it is possible to write all the records in a predetermined range into the intermediate buffer 10 in this manner, but when a read error is caused by a flaw in the data area D or the like, as shown in FIG. 9B, the device adapters 6a, 6b stop reading, so that the subsequent records are not stored in the intermediate buffer 10. In this situation, the search ID operation and the search key operation, which are possible in the synchronous transfer control system, are impossible. In other words, an asynchronous transfer control system must have similar functions to those of a synchronous transfer control system. No conventional asynchronous transfer control system has those functions.
Problems in asynchronous transfer control
As described above, in the conventional asynchronous transfer control system, it is impossible to write all the records in a predetermined range into the intermediate buffer 10 when a read error is caused due to a flaw in a data area or a key area, so that the search ID operation and the search key operation, which are possible in the synchronous transfer control system, are impossible and it is impossible to search for a required record or key portion.
Problems caused by a trouble in the head at the time of writing
A write head sometimes gets out of order during the execution of a write key data (Write Key Data) command. For example, the write head may get out of order in the course of the movement to the subsequent data portion (data area) after the normal end of the operation of writing data to a key portion (key area). Such a trouble leads to a problem in the guaranty of data. In other words, since it is possible to read such data without any trouble, the CPU deals with the record with a new key portion and the old data portion.
Problems in a dynamic path recombination system
A recent large computer system is generally composed of a plurality of central processing units (CPU). In such a system, common use of data and communication of data among a plurality of CPUs are necessary. For this purpose, an I/O device subsystem including an external storage unit used in the system is required to be provided with a multiplicity of host interfaces. To meet this demand, the I/O subsystem (magnetic disk control apparatus) is provided with a multiplicity of channel adapters, and these channel adapters are connected to the CPUs. A multiplicity of I/O devices are connected to the I/O subsystem. Since data for one file are written into and read from an I/O device as a unit, the I/O device is sometimes called a file device, and the I/O subsystem a file controller.
In such a system, when frequently accessing a file device connected to one file controller, access is concentrated on one channel adapter of the file controller, so that the busy ratio of that channel adapter becomes high. As a result, the response to access is slow, thereby lowering the performance. To prevent the performance from being lowered, a method of providing a plurality of access paths between a host apparatus and one file controller so as to disperse access and lower the busy ratio of a path (channel adapter) may be adopted. A further improved method (dynamic path recombination) is proposed in which data is transferred through a path different from the path which is accessed. In a dynamic path recombination system, the host apparatus registers in advance the paths to which the host apparatus is connected into the file controller (path groups are produced). When the positioning of the head to a required record is finished (e.g., a search ID operation is finished) and the operation end is reported to the host apparatus, a resource manager searches for the channel adapters to which the host apparatus is connected. In other words, the channel adapters of the same group are searched. The resource manager so controls that a vacant channel adapter in the predetermined group reports the operation end to the host adapter by interruption. In this manner, the dynamic path recombination system enables effective use of a plurality of paths (channel adapters).
In such a conventional dynamic path recombination system, however, a vacant channel adapter in the plurality of channel adapters of the same group interrupts the processing, and the busy ratio of the channel adapter (the frequency at which the channel adapter is used) not is taken into consideration. That is, a vacant path (channel adapter) in the group preset by the host apparatus at the time of start is selected as occasion demands. Therefore, if the busy ratio of the selected channel adapter (path) is very high, the use of the resource is inefficient and it is impossible to shorten the response time.
Problems in recovery control of a module having a trouble
In an I/O subsystem using a plurality of modules, a module (service adapter) for detecting a module having a trouble and recovering it is provided. When a hardware trouble is caused in a module, the service adapter detects the trouble and recovers the module. In addition, the service adapter informs the resource manager 1 that the module cannot be used because it is in the process of recovery and 2 that it can be operated because it has been recovered. The resource manager is informed of these pieces of information through a bus (C-BUS) which is used in common by each module. However, service adapter recovers a module through a different bus (B-BUS).
If trouble is caused in the service adapter simultaneously with trouble in a module, the service adapter can neither recover the module having the trouble nor inform the resource manager of the recovery of the module. Especially, even if the service adapter is recovered by some means and enables the recovery of the module having the trouble, the service adapter forgets the module having the trouble due to the trouble of the service adapter itself and does not recover it. This may cause a serious problem such as system failure in the worst case.
When trouble is caused in the service adapter after the end of the recovery of a module having trouble and before the service adapter informs the resource manager of the recovery of the module, the report of the recovery to the resource manager is also impossible. This also causes serious trouble such as system failure in the worst case.
Problems at the time of trouble
It is possible to inform a host apparatus of a detection error in the I/O subsystem only when there is an access from the host apparatus. An internal error (detection error by a service adapter, internal diagnosis error) which has no relation to access is reported by reporting a unit check so that sense information is reaped at the time of starting the I/O subsystem (SIO). This method is however inconvenient in that even access which has no relation to an error is influenced. In addition, since a conventional I/O subsystem has no means for positively informing a host apparatus of an error detected, it cannot be reported until the host apparatus accesses it, so that it is impossible to prevent the trouble. Furthermore, the choice of a recovery method with respect to the reported error is left to the host apparatus. Therefore, the recovery instructed by the host apparatus is not necessarily the recovery which the I/O subsystem requires. A trouble in the host apparatus influences a subordinate apparatus (I/O subsystem), which, in turn, influences a path of another system. In the related art, the path is separated from the subsystem so as to prevent deleterious influence on another system. According to this method, however, the trouble in the host apparatus may be mistaken for a problem in the I/O subsystem. As a result, it takes a long time for appropriate separation of a unit having a trouble, or it is impossible to provide the host apparatus with a chance of recovery.